home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / diff.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  3KB  |  85 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Paolo Maggi <paolo.maggi@polito.it>
  5.  Copyright (C) 2003 Paolo Maggi <paolo.maggi@polito.it>
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23. <language id="diff" _name="Diff" version="2.0" _section="Others">
  24.   <metadata>
  25.     <property name="mimetypes">text/x-diff;text/x-patch</property>
  26.     <property name="globs">*.diff;*.patch</property>
  27.   </metadata>
  28.  
  29.   <styles>
  30.     <style id="added-line"    _name="Added line"/> <!--Others 2-->
  31.     <style id="removed-line"  _name="Removed line"/> <!--Others 3-->
  32.     <style id="changed-line"  _name="Changed line"/> <!--Preprocessor-->
  33.     <style id="special-case"  _name="Special case"/> <!--String-->
  34.     <style id="location"      _name="Location"/> <!--Keyword-->
  35.     <style id="ignore"        _name="Ignore" map-to="def:comment"/>
  36.     <style id="diff-file"     _name=""/> <!--Data Type-->
  37.   </styles>
  38.  
  39.   <definitions>
  40.     <define-regex id="diff-file">^(diff |\+\+\+ |Index: |==== |\*\*\* |--- )</define-regex>
  41.  
  42.     <context id="diff">
  43.       <include>
  44.         <context id="diff-file" style-ref="diff-file" end-at-line-end="true">
  45.           <start>\%{diff-file}</start>
  46.         </context>
  47.  
  48.         <context id="removed-line" style-ref="removed-line">
  49.           <match>^(<|-).*$</match>
  50.         </context>
  51.  
  52.         <context id="added-line" style-ref="added-line">
  53.           <match>^(\+|>).*$</match>
  54.         </context>
  55.  
  56.         <context id="changed-line" style-ref="changed-line">
  57.           <match>^\! .*$</match>
  58.         </context>
  59.  
  60.         <context id="location" style-ref="location" end-at-line-end="true">
  61.           <start>^((@@)|[0-9]|\*\*\*\*)</start>
  62.           <include>
  63.             <context ref="def:escape"/>
  64.           </include>
  65.         </context>
  66.  
  67.         <context id="special-case" style-ref="special-case">
  68.           <prefix>^</prefix>
  69.           <suffix>\b</suffix>
  70.           <keyword>Only in .*</keyword>
  71.           <keyword>Files .* and .* are identical$</keyword>
  72.           <keyword>Files .* and .* differ$</keyword>
  73.           <keyword>Binary files .* and .* differ$</keyword>
  74.           <keyword>File .* is a .* while file .* is a .*</keyword>
  75.           <keyword>No newline at end of file .*</keyword>
  76.         </context>
  77.  
  78.         <context style-ref="ignore" end-at-line-end="true">
  79.           <start>^\S</start>
  80.         </context>
  81.       </include>
  82.     </context>
  83.   </definitions>
  84. </language>
  85.